#include "QtPrivateDeclar.h"
#include <QJsonObject>

QtPrivateDeclar::QtPrivateDeclar(): d_ptr(new QtPrivateDeclarPrivate(this))
{
    
}

void QtPrivateDeclar::setObject(QJsonObject object){
    if (object.contains("id")) {
        setId(object.value("id").toString());
    }
    if (object.contains("pai_ming")) {
        setPai_ming(object.value("pai_ming").toInt());
    }
    if (object.contains("ming_cheng")) {
        setMing_cheng(object.value("ming_cheng").toString());
    }
    if (object.contains("shu_zhi")) {
        setShu_zhi(object.value("shu_zhi").toString());
    }
    if (object.contains("bai_fen_bi")) {
        setBai_fen_bi(object.value("bai_fen_bi").toInt());
    }
}

void QtPrivateDeclar::setId(QString id) {
    Q_D(QtPrivateDeclar);
    d->id = id;
}
QString QtPrivateDeclar::getId() {
    Q_D(QtPrivateDeclar);
    return d->id;
}

void QtPrivateDeclar::setPai_ming(int pai_ming) {
    Q_D(QtPrivateDeclar);
    d->pai_ming = pai_ming;
}
int QtPrivateDeclar::getPai_ming() {
    Q_D(QtPrivateDeclar);
    return d->pai_ming;
}

void QtPrivateDeclar::setMing_cheng(QString ming_cheng) {
    Q_D(QtPrivateDeclar);
    d->ming_cheng = ming_cheng;
}
QString QtPrivateDeclar::getMing_cheng() {
    Q_D(QtPrivateDeclar);
    return d->ming_cheng;
}

void QtPrivateDeclar::setShu_zhi(QString shu_zhi) {
    Q_D(QtPrivateDeclar);
    d->shu_zhi = shu_zhi;
}
QString QtPrivateDeclar::getShu_zhi() {
    Q_D(QtPrivateDeclar);
    return d->shu_zhi;
}

void QtPrivateDeclar::setBai_fen_bi(int bai_fen_bi) {
    Q_D(QtPrivateDeclar);
    d->bai_fen_bi = bai_fen_bi;
}
int QtPrivateDeclar::getBai_fen_bi() {
    Q_D(QtPrivateDeclar);
    return d->bai_fen_bi;
}
